package com.lite.haru.alarmpolice.activity;

import org.kymjs.kjframe.KJActivity;
import org.kymjs.kjframe.ui.BindView;

import android.view.View;
import android.widget.TextView;

import com.lite.haru.R;
import com.lite.haru.constant.PoliceApplication;

public class PoliceInfoAty extends KJActivity {

	private PoliceApplication mApp;

	private int police_id;
	private String pname;// 警察姓名
	private String phone;// 电话
	private String province;// 省
	private String city;// 市
	private String district;// 街道

	@BindView(id = R.id.info_id)
	private TextView info_id;
	@BindView(id = R.id.info_pname)
	private TextView info_pname;
	@BindView(id = R.id.info_phone)
	private TextView info_phone;
	@BindView(id = R.id.info_province)
	private TextView info_province;
	@BindView(id = R.id.info_city)
	private TextView info_city;
	@BindView(id = R.id.info_district)
	private TextView info_district;
	@BindView(id = R.id.backSetting, click = true)
	private TextView backSetting;

	@Override
	public void setRootView() {
		setContentView(R.layout.aty_police_info);
	}

	@Override
	public void initData() {
		mApp = (PoliceApplication) getApplication();
		police_id = mApp.police_id;
		pname = mApp.pname;
		phone = mApp.phone;
		province = mApp.province;
		city = mApp.city;
		district = mApp.district;

		super.initData();
	}

	@Override
	public void initWidget() {

		info_id.setText("警员编号：" + police_id);
		info_pname.setText("警察姓名：" + pname);
		info_phone.setText("手机号码：" + phone);
		info_province.setText("所属省份：" + province);
		info_city.setText("所属城市：" + city);
		info_district.setText("所属地区：" + district);

		super.initWidget();
	}

	@Override
	public void widgetClick(View v) {
		super.widgetClick(v);
		switch (v.getId()) {
		case R.id.backSetting:
			PoliceInfoAty.this.finish();
			break;

		default:
			break;
		}
	}

}
